package maldade.action;

import maldade.configuration.ConfigurationLoader;
import maldade.configuration.MessageLoader;
import maldade.service.ExampleService;
import maldade.service.ServiceFactory;

import org.apache.log4j.Logger;
import org.apache.struts.actions.MappingDispatchAction;

/**
 * Parent action, all actions will be derived from this.
 * 
 * @author rnojiri
 */
public class AbstractMappingDispatchAction extends MappingDispatchAction
{
	public static final String SUCCESS_FORWARD = "success";
	public static final String FAIL_FORWARD = "fail";
	
	protected Logger log = Logger.getLogger(AbstractMappingDispatchAction.class);
	
	protected ConfigurationLoader configuration;
	
	protected ExampleService exampleService;
	
	protected MessageLoader messageLoader; 
	
	/**
	 * Initializes all variables needed.
	 */
	public AbstractMappingDispatchAction()
	{
		configuration = ConfigurationLoader.getInstance();
		
		exampleService = ServiceFactory.getExampleService();
		
		messageLoader = MessageLoader.getInstance();
	}
}
